package utility.file.writefile;

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;

public class WriteFile {
	public static void main(String[] args) {
		FileOutputStream fos = null;
		OutputStreamWriter osw = null;
		BufferedWriter bw = null;

		FileInputStream fis = null;
		InputStreamReader isr = null;
		BufferedReader br = null;

		String sUni = null;

		try { // write a UniCode string to a file
				// "/varadpv6/marin_link/document1.txt"
			fos = new FileOutputStream("/dis");
			osw = new OutputStreamWriter(fos, "UTF-8");
			bw = new BufferedWriter(osw);

			bw.write("アカウント\tbasd\tasdad\nasdsd\tasadsd" + "\n" + "asdad");
			bw.flush();
			bw.close();
			/*
			 * // read a Unicode string from a file fis = new FileInputStream(
			 * "javauni.txt" ); isr = new InputStreamReader( fis, "Unicode" );
			 * br = new BufferedReader( isr );
			 *
			 * while( true ) { try { sUni = br.readLine(); if( sUni == null ) {
			 * break; } System.out.println( "br value: " + sUni ); } catch(
			 * Exception ae ) { System.out.println("ae: " + ae ); break; } } //
			 * end while br.close();
			 */
		} catch (Exception e) {
			System.out.println("e: " + e);
		}

	} // end main
} // End class WRUni

